package com.lancoo.cvas.mapper;

import com.lancoo.cvas.config.MybatisRedisCache;
import com.lancoo.cvas.entity.TeachingClassStudent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.cvas.pojo.vo.TeachingClassCourseDto;
import org.apache.ibatis.annotations.CacheNamespace;

import java.util.Collection;
import java.util.List;

/**
 * 教学班对应的学生
 * 
 * @author liufeng
 * @email 1037383243@qq.com
 * @date 2023-12-04 11:54:00
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface TeachingClassStudentMapper extends BaseMapper<TeachingClassStudent> {

    /**
     * 获取教学班学生人数
     * @param teachingClassIds
     * @return
     */
    List<TeachingClassCourseDto> getStudentNumber(List<Long> teachingClassIds);

    /**
     *批量添加学生
     * @param teachingClassStudentCollection
     * @return
     */
    int addBatchSetTime(List<TeachingClassStudent> teachingClassStudentCollection);

    /**
     * 批量插入教学班学生
     * @param teachingClassStudentCollection
     * @return
     */
    int addBatch(List<TeachingClassStudent> teachingClassStudentCollection);

    /**
     * @Description: 减少产生冲突  筛选教学班学生已经排了的课时
     * @Author: liufeng
     * @Date: 2024/2/28 16:14
     * @param teachingClassId:
     * @return:
     */
    List<String> getScheduledTimeCodes(Long teachingClassId);

    List<TeachingClassStudent> getStudentList(List<Long> teachingClassIds);

    List<Long> getTeachingClassStudentTcIds(Long teachingClassId);
}
